package com.zc.app;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.stage.Stage;

/**
 * Created by User on 2017/5/11.
 */
public class FXLifeCycleApp extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {
        String name = Thread.currentThread().getName();
        System.out.println("start() method: " + name);

        Scene scene = new Scene(new Group(),200,200);
        primaryStage.setScene(scene);
        primaryStage.setTitle("JavaFX Application Lief Cycle");
        primaryStage.show();
    }

    @Override
    public void init() throws Exception {
        String name = Thread.currentThread().getName();
        System.out.println("init() method: " + name);
    }

    @Override
    public void stop() throws Exception {
        String name = Thread.currentThread().getName();
        System.out.println("stop() method: " + name);
    }

    public static void main(String[] args){
        Application.launch(args);
    }

    public FXLifeCycleApp() {
        String name = Thread.currentThread().getName();
        System.out.println("FXLifeCycleApp() constructor: " + name);
    }
}
